package com.csr;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo; 

public class AppData 
{
	public static String imei;
	//public static String hostURL="http://vtsadmin.buttonpay.co.tz";
	public static String hostURL="http://192.168.2.21:5011";
	//public static String hostURL="http://58.68.123.107:5011";
	public static UserInfo userInfo=new UserInfo();
	public static ResellerInfo agentInfo;
	public static UserInfo getUserInfo()
	{
		return userInfo;
	}
	public static void setUserInfo(UserInfo u)
	{
	   userInfo=u;
	}
	public static boolean isOnline(Context c) 
	{
	    ConnectivityManager cm = (ConnectivityManager) c.getSystemService(Context.CONNECTIVITY_SERVICE);
	    NetworkInfo netInfo = cm.getActiveNetworkInfo();
	    
	    if (netInfo != null && netInfo.isConnected()) 
	    {
	        return true;
	    }
	    else 
	    {
	        return false;
	    }
	}
}
